Scientists now say that an ocean several miles deep once covered a third of the surface of the planet, enough water to support the origin and evolution of life. The red planet, they said, had once been a deep blue, just like Earth.

For generations, people have been fascinated by the idea of life on Mars. It began in earnest in the late 19th century when an Italian astronomer called Giovanni Schiaparelli peered through his telescope and saw long, straight lines etched on to the surface of the red planet. He called them "canali " and others quickly became convinced that an alien civilisation had built a sophisticated network of canals, perhaps to move water from one region of Mars to another.

In 1897, H G Wells published The War of the Worlds, which describes an invasion of Martians covetous of Earth's rich natural resources. When Orson Welles broadcast his famous radio adaptation of the book in 1938, mass panic ensued when thousands of Americans truly believed that the Earth was under attack by Martians.

The true nature of Mars, however, emerged in the late 1960s when the Mariner space missions paid the first visits to Earth's smaller neighbour. Mars turned out to be heavily cratered, dotted with extinct volcanoes, colder than Antarctica and, crucially, drier than the Atacama desert - the driest place on Earth.

Mars was a dead place, a desiccated wasteland sterilised by harsh solar radiation. Anything approximating to a biological molecule on the Martian surface would be instantly irradiated. There were certainly no canals, no water and quite evidently no life - or, at least, not life as we know it.

When the Viking spacecraft visited Mars in the 1970s they confirmed this view of a lifeless planet. Viking images depicted a bitterly cold, dry landscape of rock and dust, but they also showed another feature that began a fresh debate over whether Mars was always such a dead planet. They detected what seemed to be the shorelines of ancient oceans - and where there was liquid water, there was a strong possibility of life.

Yesterday, American and Canadian scientists reignited the debate over whether there was ever a giant ocean of liquid water on Mars. According to a study published in the journal Nature, an ocean several miles deep once covered a third of the surface of Mars - easily enough water to support the origin and evolution of life. The red planet, they said, had once been a deep blue, just like Earth.

The Viking probes of 25 years ago detected two possible ancient shorelines near the poles of the planet. The shorelines stretched for thousands of kilometres around what looked like dried-up ocean basins. Each shoreline had the distinctive "edges" separating the rugged, weathered landscape of dry land from the smoother, sediment-filled seabed.

The similarity to features seen on Earth were obvious for all to see. The Viking probes had mapped two Martian shorelines - one called Arabia and the other named Deuteronilus - and scientists dated them to be between two and four billion years old.

However, a major problem soon emerged. In the 1990s, Nasa's Mars Global Surveyor mapped the topography of Mars to a resolution of 300 metres and it quickly became apparent that the two "shorelines" varied in elevation by almost two miles. Differences in height between shorelines on Earth were well known - caused by variations in global sea levels - but the dramatic difference on Mars made it highly unlikely that these " shorelines" were created by an ancient ocean.

The topographic reality revealed by the Mars Global Surveyor became the biggest stumbling block to the notion that Mars was once smothered in water. It was also a blow to the idea of Martian life, because without water in liquid form it was difficult to see how life could ever get going in the first place, never mind evolving into even the most simple of microbial lifeforms.

The latest study seems to have lifted this barrier to the idea of an ocean on Mars. Scientists at the University of California, Berkeley, the University of Toronto and the Carnegie Institution in Washington have offered a powerful explanation for why the two ancient shorelines of Mars are separated by such dramatically different elevations.

They have shown that the axis of spin of Mars, which determines the position of the true poles rather than the magnetic poles, has varied by as much as 50 degrees during the long geological history of the planet. In other words the shorelines have moved around because the planet itself has in the past shifted significantly on its axis - resulting in huge changes to the shape of the Martian landscape and its shorelines.

"When the spin axis moves relative to the surface, the surface deforms, and this is recorded in the shoreline," explained Professor Michael Manga, of the University of California, Berkeley.

Planets such as Earth and Mars have an outer shell, or lithosphere, and a change in the spin axis can cause the solid surface to deform differently than the liquid ocean and this explains the warped shorelines, according to Taylor Perron, the lead author of the study, who is now at Harvard University.

"On planets like Mars and Earth with an outer shell, or lithosphere, that behaves elastically, the solid surface will deform differently than the sea surface, creating a non-uniform change in the topography," Dr Perron said.

Jerry Mitrovica of Toronto University said that the evidence is now so overwhelming that this can explain why the shorelines of Mars formed at such dramatically different heights - more than a mile difference in elevation.

"At some point in the planet's history, a major shift of mass caused the pole to wander about 50 degrees towards its current location and the resulting change in orientation dramatically warped the topography and the ancient shorelines," Professor Mitrovica said.

One critical piece of evidence in support of this hypothesis is the position of the immense Tharsis volcano on Mars - the biggest in the Solar System and some 10,000 times bigger than Mauna Loa, the biggest volcano on Earth. Tharsis is so massive that it will always reorient itself to sit on the planet's equator - it will be spun out to the widest point on the axis of spin, just like a centrifuge. The scientists found that their assessment of how the position of the Martian poles has moved matches precisely the movements of Tharsis as it keeps shifting to maintain its place on the changing position of the equator.

"The chances of this happening randomly are less than 1 in 10,000," Professor Mitrovica said.

As yet the scientists do not understand why the spin axis of Mars moved so much. It may have resulted from a massive deluge of water on the Martian surface resulting in the first Arabia shoreline. The shift in weight caused the planet to tilt on its axis. Once the water disappeared, the pole could have shifted back, then shifted again as a second deluge created the Deuteronilus shoreline. "What we don't know is what caused the poles to shift on Mars and what happened to the water. The ocean may have been gradually converted into water vapour, moved to higher elevations, and flowed beneath the surface. There could be a large mass of water deep within Mars," Dr Perron said.

But what happened to the water on Mars is critical in the assessment of whether there is still life on the planet. Many scientists believe there is a strong chance that if liquid water exists deep under the surface of Mars, there is a good chance that simple lifeforms may still be living underground.

At the end of last year, Nasa scientists analysed successive satellite images of craters on Mars that appeared to show erosion marks caused by streams of liquid water bubbling up from under the surface of Mars and flowing down the sides of the crater. The scientists were convinced that these marks were not simply created by the movement of dry dust.

This finding came on top of a succession of studies pointing to the possibility that water must have flowed on the surface of Mars. And now the major obstacle to the idea of a massive ocean on Mars has been removed. It really does seem that the red planet was once a water-rich world, and that some of this water may still be present in underground deposits.

But what does this mean for life? The point is that without water in its liquid form it is difficult to imagine that life could exist. Water does not make life obligatory, but it does make it far more likely. As yet the only direct evidence for life on Mars has been highly controversial. Ten years ago, Nasa scientists announced that they had found possible signs of life on a Martian meteorite called ALH84001. The potato-sized lump of rock fell to Earth 13,000 years ago and a detailed analysis threw up chemical signatures of life, as well as rod-shaped structures that looked like terrestrial bacteria, but smaller.

Other scientists have been bitterly critical of this analysis, which has gone through a series of claims and counterclaims concerning its authenticity. The only way of truly solving this problem is to look for a similar piece of rock on Mars and bring it back to Earth for analysis. And the best place to find Martian fossils is in sedimentary rock formed by an ocean. At least scientists looking for life on Mars now have a better idea where to find it.